{include file="public/head"}
    <body>
    <div class="x-body">
      <div  class="lotus-nav" >
            

          <div class="layui-input-inline">
              <input value="{php}echo isset($_GET['eva_man'])?$_GET['eva_man']:'';{/php}"  name="eva_man"   class="layui-input lotus-input"  placeholder="请输入评价人搜索">
          </div>

            <button class="layui-btn layui-btn-sm search-query"><i class="layui-icon layui-icon-search"></i></button>

            
            <span class="x-right">共有数据:<i class="i_count" style="color: red;font-size: 22px">{$evas->total()}</i>条 <button onclick="javascript:location.reload()" class="layui-btn layui-btn-xs"><i class="icon iconfont ">&#xe6aa;</i></button></span>

       </div>

    <table class="layui-table" lay-data="{id: 'test',limit:9}">
        <thead>
          <tr>
            <th lay-data="{field:'id',width:60}">ID</th>
            <th lay-data="{field:'att'}">服务态度</th>
            <th lay-data="{field:'level'}">技术水平</th>
            <th lay-data="{field:'response'}">响应时效</th>
            <th lay-data="{field:'feedback', width:400}">意见与反馈</th>
            <th lay-data="{field:'eva_man', width:80}">评价人</th>
            <th lay-data="{field:'evaTime',width:160}">评价时间</th>    
            <th lay-data="{field:'Action', width:65}">操作</th>
        </thead>
        <tbody>

        {volist name="evas" id="vo"}
        	<tr>
              <td>{$vo.id}</td>
	            <td>
                {eq name='$vo["att"]' value="1"}
                <span>
                  <i class="layui-icon" style="color: #ffdd99;">&#xe67a;</i>
                  <i class="layui-icon" style="color: #ffdd99;">&#xe67b;</i>
                  <i class="layui-icon" style="color: #ffdd99;">&#xe67b;</i>
                  <i class="layui-icon" style="color: #ffdd99;">&#xe67b;</i>
                  <i class="layui-icon" style="color: #ffdd99;">&#xe67b;</i>
                </span>
                {/eq}
                {eq name='$vo["att"]' value="2"}
                <span>
                  <i class="layui-icon" style="color: #ffdd99;">&#xe67a;</i>
                  <i class="layui-icon" style="color: #ffdd99;">&#xe67a;</i>
                  <i class="layui-icon" style="color: #ffdd99;">&#xe67b;</i>
                  <i class="layui-icon" style="color: #ffdd99;">&#xe67b;</i>
                  <i class="layui-icon" style="color: #ffdd99;">&#xe67b;</i>
                </span>
                {/eq}
                {eq name='$vo["att"]' value="3"}
                <span>
                  <i class="layui-icon" style="color: #ffdd99;">&#xe67a;</i>
                  <i class="layui-icon" style="color: #ffdd99;">&#xe67a;</i>
                  <i class="layui-icon" style="color: #ffdd99;">&#xe67a;</i>
                  <i class="layui-icon" style="color: #ffdd99;">&#xe67b;</i>
                  <i class="layui-icon" style="color: #ffdd99;">&#xe67b;</i>
                </span>
                {/eq}
                {eq name='$vo["att"]' value="4"}
                <span>
                  <i class="layui-icon" style="color: #ffdd99;">&#xe67a;</i>
                  <i class="layui-icon" style="color: #ffdd99;">&#xe67a;</i>
                  <i class="layui-icon" style="color: #ffdd99;">&#xe67a;</i>
                  <i class="layui-icon" style="color: #ffdd99;">&#xe67a;</i>
                  <i class="layui-icon" style="color: #ffdd99;">&#xe67b;</i>
                </span>
                {/eq}
                {eq name='$vo["att"]' value="5"}
                <span>
                  <i class="layui-icon" style="color: #ffdd99;">&#xe67a;</i>
                  <i class="layui-icon" style="color: #ffdd99;">&#xe67a;</i>
                  <i class="layui-icon" style="color: #ffdd99;">&#xe67a;</i>
                  <i class="layui-icon" style="color: #ffdd99;">&#xe67a;</i>
                  <i class="layui-icon" style="color: #ffdd99;">&#xe67a;</i>
                </span>
                {/eq}
              </td>
              <td>
                {eq name='$vo["level"]' value="1"}
                <span>
                  <i class="layui-icon" style="color: #ffdd99;">&#xe67a;</i>
                  <i class="layui-icon" style="color: #ffdd99;">&#xe67b;</i>
                  <i class="layui-icon" style="color: #ffdd99;">&#xe67b;</i>
                  <i class="layui-icon" style="color: #ffdd99;">&#xe67b;</i>
                  <i class="layui-icon" style="color: #ffdd99;">&#xe67b;</i>
                </span>
                {/eq}
                {eq name='$vo["level"]' value="2"}
                <span>
                <i class="layui-icon" style="color: #ffdd99;">&#xe67a;</i>
                  <i class="layui-icon" style="color: #ffdd99;">&#xe67a;</i>
                  <i class="layui-icon" style="color: #ffdd99;">&#xe67b;</i>
                  <i class="layui-icon" style="color: #ffdd99;">&#xe67b;</i>
                  <i class="layui-icon" style="color: #ffdd99;">&#xe67b;</i>
                </span>
                {/eq}
                {eq name='$vo["level"]' value="3"}
                <span>
                <i class="layui-icon" style="color: #ffdd99;">&#xe67a;</i>
                  <i class="layui-icon" style="color: #ffdd99;">&#xe67a;</i>
                  <i class="layui-icon" style="color: #ffdd99;">&#xe67a;</i>
                  <i class="layui-icon" style="color: #ffdd99;">&#xe67b;</i>
                  <i class="layui-icon" style="color: #ffdd99;">&#xe67b;</i>
                </span>
                {/eq}
                {eq name='$vo["level"]' value="4"}
                <span>
                  <i class="layui-icon" style="color: #ffdd99;">&#xe67a;</i>
                  <i class="layui-icon" style="color: #ffdd99;">&#xe67a;</i>
                  <i class="layui-icon" style="color: #ffdd99;">&#xe67a;</i>
                  <i class="layui-icon" style="color: #ffdd99;">&#xe67a;</i>
                  <i class="layui-icon" style="color: #ffdd99;">&#xe67b;</i>

                </span>
                {/eq}
                {eq name='$vo["level"]' value="5"}
                <span>
                  <i class="layui-icon" style="color: #ffdd99;">&#xe67a;</i>
                  <i class="layui-icon" style="color: #ffdd99;">&#xe67a;</i>
                  <i class="layui-icon" style="color: #ffdd99;">&#xe67a;</i>
                  <i class="layui-icon" style="color: #ffdd99;">&#xe67a;</i>
                  <i class="layui-icon" style="color: #ffdd99;">&#xe67a;</i>
                </span>
                {/eq}
              </td>
              <td>
                {eq name='$vo["response"]' value="1"}
                <span><i class="layui-icon" style="color: #ffdd99;">&#xe67a;</i>
                  <i class="layui-icon" style="color: #ffdd99;">&#xe67b;</i>
                  <i class="layui-icon" style="color: #ffdd99;">&#xe67b;</i>
                  <i class="layui-icon" style="color: #ffdd99;">&#xe67b;</i>
                  <i class="layui-icon" style="color: #ffdd99;">&#xe67b;</i>
                </span>
                {/eq}
                {eq name='$vo["response"]' value="2"}
                <span>

                <i class="layui-icon" style="color: #ffdd99;">&#xe67a;</i>
                  <i class="layui-icon" style="color: #ffdd99;">&#xe67a;</i>
                  <i class="layui-icon" style="color: #ffdd99;">&#xe67b;</i>
                  <i class="layui-icon" style="color: #ffdd99;">&#xe67b;</i>
                  <i class="layui-icon" style="color: #ffdd99;">&#xe67b;</i>
                </span>
                {/eq}
                {eq name='$vo["response"]' value="3"}
                <span>
                <i class="layui-icon" style="color: #ffdd99;">&#xe67a;</i>
                  <i class="layui-icon" style="color: #ffdd99;">&#xe67a;</i>
                  <i class="layui-icon" style="color: #ffdd99;">&#xe67a;</i>
                  <i class="layui-icon" style="color: #ffdd99;">&#xe67b;</i>
                  <i class="layui-icon" style="color: #ffdd99;">&#xe67b;</i>
                </span>
                {/eq}
                {eq name='$vo["response"]' value="4"}
                <span><i class="layui-icon" style="color: #ffdd99;">&#xe67a;</i>
                  <i class="layui-icon" style="color: #ffdd99;">&#xe67a;</i>
                  <i class="layui-icon" style="color: #ffdd99;">&#xe67a;</i>
                  <i class="layui-icon" style="color: #ffdd99;">&#xe67a;</i>
                  <i class="layui-icon" style="color: #ffdd99;">&#xe67b;</i>
                </span>
                {/eq}
                {eq name='$vo["response"]' value="5"}
                <span>
                <i class="layui-icon" style="color: #ffdd99;">&#xe67a;</i>
                  <i class="layui-icon" style="color: #ffdd99;">&#xe67a;</i>
                  <i class="layui-icon" style="color: #ffdd99;">&#xe67a;</i>
                  <i class="layui-icon" style="color: #ffdd99;">&#xe67a;</i>
                  <i class="layui-icon" style="color: #ffdd99;">&#xe67a;</i></span>
                {/eq}
              </td>
              <td>{$vo.feedback}</td>
              <td>{$vo.eva_man}</td>
              <td>{$vo.evaTime}</td>
              

	            <td style="padding: 5px 2px; width: 110px;">
                
	             	<button onclick="delEva(this,{$vo.id})" class="layui-btn layui-btn-xs layui-btn-danger" style="float: right; margin-top: 3px">删除</button>

	           </td>
	        </tr>
        {/volist}
       
        </tbody>
      </table>
	      <div class="page">
	        <div>
	        	{$evas->render()}
	        </div>
	      </div>
    </div>
</body>
{include file="public/foot"}
    <script>
        var layer = layui.layer
            ,form = layui.form;


        $(".search-query").click(function () {
            var eva_man = $("input[name=eva_man]").val();
            window.location.href = 'evalist.html?eva_man='+eva_man;
        });

      
      function delAll (argument) {
        var data = tableCheck.getData();
        layer.confirm('确认要全部删除吗？',function(index){
            //捉到所有被选中的，发异步进行删除
            layer.msg('删除成功', {icon: 1});
            $(".layui-form-checked").not('.header').parents('tr').remove();
        });
      }

      function delEva(obj,id){
        var count = $(".i_count")[0].innerText;
        layer.confirm('确认要删除吗？',function(index){
            //捉到所有被选中的，发异步进行删除
            $.post("{:url('admin/eva/deleteEva')}", {id: id}, function(data, textStatus, xhr) {
          /*optional stuff to do after success */
              console.log(data);
              if(data.code==1){
                  layer.msg(data.msg,{icon:1,time:1000},function(){
                    $(obj).parents('tr').remove();
                    $(".i_count").html(count-1);
                  });
              }else{
                  layer.msg(data.msg,{icon:2,time:1000});
              }
            
            });
        });
      }
    </script>
